package com.hmall.common.client;

import com.hmall.common.pojo.Order;
import com.hmall.common.pojo.OrderDetail;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "orderservice")
public interface OrderClient {

    @GetMapping("/order/{id}")
    Order queryOrderById(@PathVariable Long id);

    @GetMapping("/order/orderDetail/{id}")
    OrderDetail queryOrderDetailById(@PathVariable Long id);

    @PutMapping("/order/update")
    void update(@RequestBody Order order);

    @DeleteMapping("/order/{id}")
    void deleteByOrderId(@PathVariable Long id);
}
